<div class="micuer_ucenter_top_nav" id="top_nav_daohang">
    <div class="layui-container">
        <div class="layui-row">
            <div class="top_nav_daohang" id="top_nav_daohang">
                <div class="layui-col-xs6 layui-col-sm3 layui-col-md3">
                    <a  href="{:url('User/index')}">
                        个人中心
                    </a>
                </div>
                <div class="layui-col-xs6 layui-col-sm3 layui-col-md3">
                    <a href="{:url('article/create')}" title="Markdown格式发布文章">
                        文章发布[MD]
                    </a>
                </div>
                <div class="layui-col-xs6 layui-col-sm3 layui-col-md3">
                    <a href="{:url('article/create_edit')}" title="富文本格式发布文章">
                        文章发布[富文本]
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    window.onload=
        function(){
            var oDiv = document.getElementById("top_nav_daohang"),
                H = 0,
                Y = oDiv
            while (Y) {
                H += Y.offsetTop;
                Y = Y.offsetParent;
            }
            window.onscroll = function()
            {
                var s = document.body.scrollTop || document.documentElement.scrollTop
                if(s>H) {
                    oDiv.style = "position:fixed;top:0;margin-top:0px;z-index:2"
                } else {
                    oDiv.style = ""
                }
            }
        }
</script>